// Copyright (c) 2012-2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef UI_VIEWS_SHELL_CONTENT_CLIENT_SHELL_MAIN_DELEGATE_H_
#define UI_VIEWS_SHELL_CONTENT_CLIENT_SHELL_MAIN_DELEGATE_H_
#pragma once

#include <string>

#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "content/public/app/content_main_delegate.h"
#include "cuc/src/cwkshell/app/shell_content_client.h"
#include "cuc/src/cwkshell/browser/shell_content_renderer_client.h"

namespace cuc {
namespace shell {

class ShellContentBrowserClient;

class ShellMainDelegate : public content::ContentMainDelegate {
 public:
  ShellMainDelegate();
  virtual ~ShellMainDelegate();

  // content::ContentMainDelegate implementation
  virtual bool BasicStartupComplete(int* exit_code) OVERRIDE;
  virtual void PreSandboxStartup() OVERRIDE;
  virtual int RunProcess(
	  const std::string& process_type,
	  const content::MainFunctionParams& main_function_params) OVERRIDE;
  virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE;
  virtual content::ContentRendererClient* CreateContentRendererClient() OVERRIDE;

  static void  InitializeResourceBundle();

 private:
  
  scoped_ptr<ShellContentBrowserClient> browser_client_;
 scoped_ptr<ShellContentRendererClient> renderer_client_;
  ShellContentClient content_client_;
  DISALLOW_COPY_AND_ASSIGN(ShellMainDelegate);
};

}  // namespace shell
}  // namespace cuc

#endif  // UI_VIEWS_SHELL_CONTENT_CLIENT_SHELL_MAIN_DELEGATE_H_
